<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>图片响应式</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<style type="text/css" media="screen">
		* {
			margin: 0;
			padding: 0;
		}
		img {
			max-width: 100%;
		}
	</style>
</head>
<body>
	<img 
		src="img/small.png" 
		srcset="img/large.png 960w, img/medium.png 640w, img/small.png 320w" 
		sizes="(max-width: 414px) 100vw, 640px" 
		alt="响应式图片" />
</body>
</html>